Skip to content

docs: document idle-first harness checks#407

Merged
joryirving merged 3 commits into
mainfrom
feat/idle-check-docs
Jun 17, 2026
Merged

docs: document idle-first harness checks#407
joryirving merged 3 commits into
mainfrom
feat/idle-check-docs

Conversation

@joryirving

Copy link
Copy Markdown
Contributor

Closes #399

Add tests verifying worker and groom idle are read-only.
Add docs/harness-idle-first.md with integration pattern.

Closes #399
its-saffron[bot]

This comment was marked as outdated.

@joryirving joryirving merged commit 61727b8 into main Jun 17, 2026
3 checks passed
@joryirving joryirving deleted the feat/idle-check-docs branch June 17, 2026 14:38

@its-saffron its-saffron Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Automated Review

Full PR review.

Analysis engine: MiniMax-M2.7@https://litellm.jory.dev/v1 (anthropic) — escalated (fast_low_confidence)

PR PR 407 Review: Document Idle-First Harness Checks

Summary

This PR adds documentation for the idle-first harness check pattern and expands test coverage to verify read-only idle behavior for both worker and groomer modes.

Change-by-Change Findings

1. New Documentation: docs/harness-idle-first.md

  • Purpose: Documents the idle-first integration pattern for harnesses calling the next-task endpoint
  • Content: Covers endpoint behavior, integration examples (curl + pseudo-code), key properties (read-only, cheap, no lease mutation), groom mode idle, non-goals, and source code references
  • Conventions check: Uses generic agent names (saffron, example-agent) consistent with AGENTS.md rule "No agent-specific names in generic docs"
  • Changelog entry present: Yes (2026-06-16 entry at bottom)
  • Issue reference: Correctly links to PR 399 in header

2. Test Additions: src/app/api/agents/[agentName]/next-task/route.test.ts

  • Worker idle tests (6 tests): Cover empty issue queue, empty PR-fix queue, short reason format, and verify read-only behavior (no issue/PR-fix/lease mutations)
  • Groom idle tests (5 tests): Cover no-candidate idle, correct reason string, and verify groom mode does not query PR-fix queue or leases
  • Test quality: Uses proper mock setup, verifies mock interactions, and covers both modes

Standards Compliance

Standard Status
No agent-specific names in generic docs ✅ Pass — uses generic patterns
Documentation includes history/changelog ✅ Pass — history section present
Tests use repository conventions ✅ Pass — follows existing test patterns
Code standards (validation, error handling) N/A — documentation and tests only

Linked Issue Fit

Issue PR 399 acceptance criteria are satisfied:

Criteria Verification
worker schedule can exit early ✅ Documented with lane=normal endpoint
groomer schedule can exit early ✅ Documented with mode=groom endpoint
tests cover empty queue state ✅ 6 worker idle tests added
tests cover empty follow-up state ✅ Tests verify PR-fix queue reads without mutation
docs show idle-first pattern ✅ Complete docs with examples, pseudo-code, key properties

Evidence Provider Findings

No evidence provider output provided.

Tool Harness Findings

No tool harness output provided.

CI Check Results

Docker Build: success
Validate: success

Unknowns / Needs Verification

None identified — PR is purely documentation and tests; no runtime behavior changes requiring verification.

Recommendation

Approve. This PR correctly addresses issue PR 399 by adding comprehensive documentation and test coverage for the idle-first harness check pattern. All acceptance criteria are met, CI passes, and the changes follow repository conventions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: expose cheap idle checks for scheduled harnesses

1 participant